import request from '@/utils/request'

// 登录方法
export function login(username, password, code, uuid) {
  const data = {
    username,
    password,
    code,
    uuid
  }
  return request({
    url: '/login',
    method: 'post',
    data: data
  })
}

export function getReportList(query) {
  return request({
    url: '/report/list',
    method: 'get',
    params: query
  })
}

export function getMonthReportList(query) {
  return request({
    url: '/report/monthList',
    method: 'get',
    params: query
  })
}

export function getInfo(id) {
  return request({
    url: '/report/' + id,
    method: 'get'
  })
}

export function updateReport(data) {
  return request({
    url: '/report',
    method: 'put',
    data: data
  })
}